
function init(){
    var menu = document.getElementById("menu");
    for(var i = 0; i < menu.childNodes.length; i ++){
        if(menu.childNodes[i].className == "mlist"){
            (function(){
                var k = i;
                menu.childNodes[i].onmouseover = function(){ mlistshow(k)};
                menu.childNodes[i].onmouseout = function(){ mlisthide(k)};
            })();
        }
    }
    if(window.opera){
    	window.clearTimeout();
    	alert("opera");
    }
}

function setState(k, state){
	var list = getmlist(+k);
    for(var i = 0; i < list.childNodes.length; i ++){
        if(list.childNodes[i].className == "mpoint"){
            list.childNodes[i].style.display = state;
        }
    }
}

var timer = null;
function mlistshow(k){
    window.clearTimeout(timer);
    log("stop" + k);
    setState(k, "block");
}

function mlisthide(k){
    timer = window.setTimeout(privatemlisthide(k), 100);
    log("go" + k );
}
function privatemlisthide(k){
	setState(k, "none");
}
function getmlist(k){
    return document.getElementById("menu").childNodes[k];
}

function log(str){
    //document.getElementById("log").innerHTML += str + "<br />\n";
}
